package org.fxml.helpers {
	import org.fxml.constants.Keywords;

	/**
	 * @author jordandoczy
	 */
	public class DisplayObjectContainerBuilder extends AbstractBuilder{

		public function DisplayObjectContainerBuilder(baseBuilder:IBuilder){
			super(baseBuilder); 
		}
		
		public override function hasProperty(instance:Object, property:String):Boolean{
			return super.hasProperty(instance, property) || (property == Keywords.CHILD);
		}
		
		public override function setProperty(instance:Object, property:String, value:*):void{
			switch(property){
				case Keywords.CHILD:
					instance.addChild(value);
				break;
				default: super.setProperty(instance, property, value);
			}
		}
	}
}
